<html>
<head>
    <link type="text/css" href="css/ui-lightness/jquery-ui-1.8.6.custom.css" rel="Stylesheet"/>
    <link type="text/css" href="css/application.css" rel="Stylesheet"/>

    <script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="js/jquery.elastic.js"></script>
    <script type="text/javascript" src="js/jquery-ui-1.8.6.custom.min.js"></script>
    <script type="text/javascript">
        var populateResult = function(data) {
            $("#input").effect("drop", "fast", function() {
                $("#results").show("slide", "fast");
            });
            $("#resultsArea").val(data);
            $("#convertButton").attr("disabled", false);
            $("#loader").hide();
        }

        $(function() {
            $("#convertButton").click(function() {
                var props = $("#props").val();
                $(this).attr("disabled", true);
                $("#loader").show();
                $.post("convert", {props: props}, populateResult, "text");
            });

            $("#props").keyup(function() {
                var props = $("#props").val();
                $("#convertButton").attr("disabled", $.trim(props).length == 0);
            });

            $("#doAnother").click(function() {
                $("#results").effect("drop", "fast", function() {
                    $("#input").show("slide", "fast");
                });
                $("#props").val("");
                $("#resultsArea").val("");
            });

            $("#results").hide();
            var props = $("#props").val();
            $("#convertButton").attr("disabled", $.trim(props).length == 0);
            $("#loader").hide();
        });

    </script>

    <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-4903947-8']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>
</head>
<body>
<div><h1>Log4J Properties to XML Converter</h1></div>

<div class="para">
    This tool is a web front-end to the Log4J Properties Converter tool. Got a problem? Want the source?
    Head over to the <a href="http://code.google.com/p/log4j-properties-converter">Log4J Properties Converter
    project page</a>.
</div>
<div id="input">
    <div class="para">
        Copy or type in your Log4J Properties below, then hit "Convert"
    </div>

    <div>
        <input type="button" value="Convert" id="convertButton">
        <img src="images/ajax-loader.gif" alt="Loading..." id="loader" style="vertical-align: bottom"/>
    </div>

    <textarea id="props" class="input" wrap="off"></textarea>

</div>
<div id="results">
    <!--<div class="success">Success!</div>-->
    <div class="para">The conversion is below.  <a href="#" id="doAnother">Do another?</a></div>
    <div class="blankButton">&nbsp;</div>
    <textarea id="resultsArea" wrap="off" class="input"></textarea>
</div>

<div class="footer">
    <div>
        Log4J Properties Converter Web Application v1.0. &copy; Jason Royals 2011.
    </div>

    <div>
        Source code for the converter, including this web application,
        are available from the <a href="http://code.google.com/p/log4j-properties-converter">Log4J Properties Converter
        project page</a>. This software is licensed to you under the
        <a href="http://www.gnu.org/licenses">GNU Public License, version 3</a>.
    </div>
    <div>
        <img src="http://code.google.com/appengine/images/appengine-silver-120x30.gif" alt="Powered by Google App Engine" />
    </div>
</div>
</body>
</html>
